<?php
/**
 * Created by Maxotm.
 * User: tuyt
 * Date: 2019/5/28
 */

Route::get('index', 'IndexController@index');
Route::any('/', 'IndexController@serve');
Route::group(['middleware' => ['web', 'wechat.oauth']], function () {
    Route::get('/user', function () {
        $user = session('wechat.oauth_user.default'); // 拿到授权用户资料

        dd($user);
    });
});